package com.martini.satoken01.model.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 在线信息
 *
 * @author martini at 2021/12/22 8:29
 */
@Data
@Accessors(chain = true)
public class OnlineInfoDO {

    /**
     * 主体id
     */
    private Long loginId;

    /**
     * 登录设备
     */
    private String device;

    /**
     * 登录时间
     */
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime loginTime;

}
